#!/bin/bash

Version=$1
MODE=$2

docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

export DOCKER_CLI_EXPERIMENTAL=enabled

echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin

docker buildx create --name op-cross-build
docker buildx use op-cross-build
docker buildx inspect --bootstrap
docker buildx ls

make build-push-${MODE}-image-${Version}
